//
//  AddModuleHeaderView.m
//  ZhuoxinAgriculture
//
//  Created by stone on 16/11/13.
//  Copyright © 2016年 KKING. All rights reserved.
//

#import "AddModuleHeaderView.h"
#import "Masonry.h"
@interface AddModuleHeaderView()

@end
@implementation AddModuleHeaderView

- (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithReuseIdentifier:reuseIdentifier];
    if (self) {
        
        UILabel * titleLabel = ({
            UILabel * label = [[UILabel alloc] init];
            /** GPU 优化 */
//            label.opaque = YES;
//            label.backgroundColor = [UIColor whiteColor];
//            label.layer.masksToBounds = YES;
            //------------------------------
            label.numberOfLines = 0;
            label.textColor = [UIColor blackColor];
            label.textAlignment = NSTextAlignmentLeft;
            label.text = @"Label的默认内容";
            label.font = [UIFont systemFontOfSize:15];
            
            // [self addSubview:label];
            // [self.view addSubview:label];
            [self.contentView addSubview:label];
            
            [label mas_makeConstraints:^(MASConstraintMaker * make) {
                make.left.mas_equalTo(self.contentView.mas_left).offset(12);
                make.right.mas_equalTo(self.contentView.mas_right).offset(-12);
                make.top.mas_equalTo(self.contentView.mas_top).offset(15);
                make.bottom.mas_equalTo(self.contentView.mas_bottom).offset(-12.5);
            }];
            label;
        });
        self.titleLabel = titleLabel;
        
        CGFloat red = 245;
        CGFloat green = 245;
        CGFloat blue = 245;
        UIColor * color = [UIColor colorWithRed:red/255.0 green:green/255.0 blue:blue/255.0 alpha:1.0];

        self.contentView.backgroundColor = color;
    }
    return self;
}
@end
